package cn.itcast.service.impl;


import cn.itcast.dao.IUserDao;
import cn.itcast.domain.User;
import cn.itcast.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("userService")
public class UserServiceImpl implements IUserService {

    @Autowired
    private IUserDao userDao;

    @Override
    public List<User> findAllUser() {
        return userDao.findAllUser();
    }

    @Override
    public void insertUser(User user) {
        userDao.insertUser(user);
    }

    @Override
    public void updatePwd(String password, Integer id){ userDao.updatePwd(password,id);}

    @Override
    public void updateSex(String sex, Integer id) {
        userDao.updateSex(sex,id);
    }

    @Override
    public void updateEmail(String email, Integer id) {
        userDao.updateEmail(email,id);
    }

    @Override
    public void updateBirthday(String birthday, Integer id) {
        userDao.updateBirthday(birthday,id);
    }

    @Override
    public void updatePersonalSign(String personalSign, Integer id) {
        userDao.updatePersonalSign(personalSign,id);
    }

    @Override
    public void updatePersonalIntro(String personalIntro, Integer id) {
        userDao.updatePersonalIntro(personalIntro,id);
    }
}
